Skip to content

fix(cli): stop db start hanging on a stalled docker (CLI-2066) - #6530

Merged
7ttp merged 6 commits into
developfrom
7ttp/cli-2066-windows-cli-21110-supabase-db-start-hangs-silently-before
Sep 10, 2026
Merged

fix(cli): stop db start hanging on a stalled docker (CLI-2066)#6530
7ttp merged 6 commits into
developfrom
7ttp/cli-2066-windows-cli-21110-supabase-db-start-hangs-silently-before

Conversation

@7ttp

@7ttp 7ttp commented Sep 8, 2026

Copy link
Copy Markdown
Member

TL;DR

db start no longer hangs forever when the docker CLI binary stalls: the already-running check now asks the Docker Engine API directly.

What's hurting the users?

Since v2.110.0 the check spawns docker container inspect and waits on it. If that binary hangs, db start shows nothing, starts nothing, and never exits (#6110). v2.109.1 was immune because it called the Engine API instead of spawning a subprocess...

Now fixed by

The probe resolves the daemon endpoint the same way the docker CLI does (DOCKER_HOST, then the context store, then the platform default) and sends GET /containers/<id>/json over the local socket or named pipe.

anything that is not a clean Engine 200 or 404 falls back to the old spawn path, so error messages,
daemon-down handling, and Podman support stay exactly as they are today.
db reset --local, db diff --use-pgadmin, and the declarative flows share the same probe and get the same fix...

Ref

@7ttp 7ttp self-assigned this Sep 8, 2026
@7ttp
7ttp requested a review from a team as a code owner September 8, 2026 20:50
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Supabase CLI preview

npx --yes https://pkg.pr.new/supabase/cli/supabase@0618b9ca599cf12f5f10f9f300d4e0229b84eee9

Preview package for commit 0618b9c.

@7ttp

7ttp commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

/ai-review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Review

Both reviews completed. After verification, the 10 reported findings merge into 9 distinct findings, all confirmed. No critical or major defects were identified; the findings comprise four minor reliability/coverage/observability concerns and five documentation or test-organization nits.

Findings

Severity Location Category Sources Claim
🟡 MINOR apps/cli/src/command-internal/db-bootstrap/local-db-running.ts:126 reliability claude The Engine probe has only a socket-inactivity timeout, so a peer that continually trickles data can keep the probe running far beyond two seconds.
🟡 MINOR apps/cli/src/commands/db/start/start.integration.test.ts:1832 test-coverage claude The Windows named-pipe transport is not exercised by a real transport test or CI job.
🟡 MINOR apps/cli/src/command-internal/db-bootstrap/local-db-running.ts:221 observability claude The Engine request bypasses DebugLogger.http, so its debug output lacks the established HTTP-request format; optional layer-time logger lookup also makes missing wiring silent.
🟡 MINOR apps/cli/src/command-internal/db-bootstrap/local-db-running.ts:134 test-coverage claude Several new probe branches, including oversized and interrupted responses and debug tracing, lack tests.
⚪ NIT apps/cli/src/command-internal/db-bootstrap/local-db-running.ts:81 documentation claude The comments cite ControlHttpReader as precedent, but that symbol is not defined or referenced anywhere else in the repository.
⚪ NIT apps/cli/src/commands/db/start/start.integration.test.ts:1743 test-organization claude+codex Tests for the shared local-db-running component are placed in the db-start handler suite instead of being colocated with their implementation.
⚪ NIT apps/cli/src/commands/start/services/vector.service.unit.test.ts:17 test-organization claude Direct tests for platformDefaultDockerHost remained in the vector service suite after the helper moved to hostname.ts.
⚪ NIT apps/cli/src/commands/db/reset/SIDE_EFFECTS.md:127 documentation claude db reset documents the new Engine request and Docker context files but omits the Docker environment variables now consumed in process.
⚪ NIT apps/cli/src/commands/db/start/SIDE_EFFECTS.md:121 documentation codex The API side-effects table inaccurately says the Engine probe uses only the response status.

Stats

Claude findings: 8 · Codex findings: 2 · Confirmed: 9 · Refuted: 0 · Uncertain: 0


Models: claude-opus-5 + gpt-5.6-sol · Trigger: manual · Workflow run

This review runs once per PR. A maintainer can request another with a /ai-review comment.

Comment thread apps/cli/src/command-internal/db-bootstrap/local-db-running.ts
Comment thread apps/cli/src/commands/db/start/start.integration.test.ts Outdated
Comment thread apps/cli/src/command-internal/db-bootstrap/local-db-running.ts Outdated
Comment thread apps/cli/src/command-internal/db-bootstrap/local-db-running.ts
Comment thread apps/cli/src/command-internal/db-bootstrap/local-db-running.ts Outdated
Comment thread apps/cli/src/commands/db/start/start.integration.test.ts Outdated
Comment thread apps/cli/src/commands/start/services/vector.service.unit.test.ts Outdated
Comment thread apps/cli/src/commands/db/reset/SIDE_EFFECTS.md Outdated
Comment thread apps/cli/src/commands/db/start/SIDE_EFFECTS.md Outdated
…db-start-hangs-silently-before

# Conflicts:
#	apps/cli/src/command-internal/pgdelta-engine-runtime.layer.ts
#	apps/cli/src/commands/db/reset/SIDE_EFFECTS.md
Comment thread apps/cli/src/command-internal/db-bootstrap/local-db-running.ts Outdated
@7ttp
7ttp force-pushed the 7ttp/cli-2066-windows-cli-21110-supabase-db-start-hangs-silently-before branch from fcff359 to b926687 Compare September 10, 2026 11:06
@7ttp
7ttp enabled auto-merge September 10, 2026 11:24
@7ttp
7ttp added this pull request to the merge queue Sep 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 10, 2026
@7ttp
7ttp added this pull request to the merge queue Sep 10, 2026
Merged via the queue into develop with commit 19d8e97 Sep 10, 2026
21 checks passed
@7ttp
7ttp deleted the 7ttp/cli-2066-windows-cli-21110-supabase-db-start-hangs-silently-before branch September 10, 2026 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows CLI 2.111.0: supabase db start hangs silently before contacting Docker

2 participants